<!--
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2022-12-19 13:34:19
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2022-12-19 15:48:06
-->
<template>
    <div>
        <slot></slot>
        <slot name="header"></slot>
        <slot :scope="scope.value"></slot>
        qqq{{ message }}222ggg
         <a-button @click="updateLocation">{{ location }}</a-button>
         <span>{{ injected }}</span>
    </div>
</template>
<script lang="ts" setup>
import { reactive, inject } from 'vue'
import { myInjectionKey } from '@/keys/index'
const message = inject('message')
console.log(message)
const scope = reactive({
    col: 1,
    index: 0,
    record: {
       aa: 11111
    }
})
const { location, updateLocation } = inject('location')
const injected = inject(myInjectionKey)
</script>